<h1>Add an account</h1>
<?php
echo $this->Form->create('User');
echo $this->Form->input('name');
echo $this->Form->input('surname');
echo $this->Form->input('email');
echo $this->Form->input('password');
//pr($user);
//if (isset($user['rights']) && $user['rights'] === 'admin') {
if($isAdmin) {
	echo $this->Form->input('rights', array(
			'options' => array('admin' => 'Admin', 'student' => 'Student', 'teacher' => 'Teacher')
		)
	);
}


	//$this->Form->select('User.id_faculty', $faculty['Faculty']['id_faculty']));
	?>
	<select name='data[User][id_faculty]'>
		<?php
			foreach ($faculties as $faculty) {
				echo "<option value='" . $faculty['Faculty']['id_faculty'] . "'>" . $faculty['Faculty']['name'] . "</option>";
			}
		?>
	</select>
<?php
	echo $this->Form->end('Register');//Save new user

